package com.yeebo.rpc.admin;

import com.github.pagehelper.Page;
import com.yeebo.model.admin.SysResource;
import com.yeebo.model.admin.SysUser;
import com.yeebo.vo.admin.SysUserLoginVO;
import com.yeebo.vo.admin.SysUserManageVO;
import com.yeebo.vo.admin.SysUserRolesVO;

import java.util.List;

/**
 * 系统用户服务接口
 */
public interface SysUserService {

    SysUser getUserByLoginName(String loginName);

    SysUserLoginVO login(String loginName, String password, String ipAddress);

    SysUserLoginVO getUserById(Long userId);

    void logout();

    List<SysResource> loadResourcesByLoginName(String loginName);

    Page<SysUserManageVO> loadSysUserManageList(Integer pageNo, Integer pageSize, String filterUsername);

    SysUserManageVO getSysUserInfoById(Long userId);

    void addSysUser(String loginName, String username, String phone);

    void updateSysUser(Long userId, String username, String phone, Integer status);

    void resetSysUserPassword(Long userId);

    void deleteSysUser(Long userId);

    List<SysUserRolesVO> loadSysRoleListByUserId(Long userId);

    void assignRolesToUser(Long userId, List<Long> roleIds);

}
